package cn.kgc.utils;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * 代理类增强
 */
public class MaryUtil {

    public void helpToMary(){
        System.out.println("布置现场");
    }

    public void endToMary(){
        System.out.println("清理现场");
    }

    public void arroundPrintMary(ProceedingJoinPoint joinPoint){
        try {
            System.out.println("我是前置增强");
            joinPoint.proceed();
            System.out.println("我是后置增强");
        } catch (Throwable throwable) {
            System.out.println("我是异常增强");
            throwable.printStackTrace();
            System.out.println("我是最终增强");
        }

    }
}
